Skip to main content

Assign Order to Driver

PATCH /tms/delivery-orders/{deliveryOrderUuid}/assign/{driverId}

Description​

This endpoint is used to assign a delivery order to a driver. The process involves specifying the delivery order and driver details, along with optional shipping fees.

Parameters​

  • countryCode (string, header, required): The country code.
  • tenantId (string, header, required): The tenant ID.
  • deliveryOrderUuid (string, path, required): The unique identifier of the delivery order.
  • driverId (string, path, required): The unique identifier of the driver.
  • shippingFee (number($double), query, optional): The shipping fee.

Responses​

Success Response (200)​

The Success Response (200) is returned when the delivery order is successfully assigned to the driver. This response indicates the success of the operation and provides additional details.

Response Fields​

FieldTypeDescription
statusbooleanIndicates the success of the assignment request.
statusCodeintegerNumeric code representing the status of the response (e.g., 0 for success).
messagestringA message indicating the outcome of the operation.
dataobjectAn empty object, as no additional data is returned in a successful response.
errorsarrayAn array of objects providing details about any errors encountered during the request.

Example Value​

JSON:

{
"status": true,
"statusCode": 0,
"message": "string",
"data": {},
"errors": [
{
"message": "string",
"descriptiveMessage": "string"
}
]
}

Error Responses​

400 Invalid reference supplied: This response is returned when an invalid reference is provided.​

404 Resource not found: This response is returned when the specified resource cannot be found.​

LANGUAGE

AUTHORIZATION

Bearer

CURL REQUEST


curl --request PATCH \ 
--url /tms/delivery-orders/{deliveryOrderUuid}/assign/{driverId} \
--header 'accept: application/json' \
--header 'content-type: application/json'

RESPONSE


Click Try It! to start a request and see the response here!